package com.db.services;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

/**
 * Created by Student on 25.11.2014.
 */
public class DateOperations {
    public static String getDataString() {
        DateFormat df = new SimpleDateFormat("yyyy-mm-dd HH:mm:ss");
        return df.format(getCurrData());
    }

    public static String getDataString(Date data) {
        DateFormat df = new SimpleDateFormat("yyyy-mm-dd HH:mm:ss");
        return df.format(data);
    }

    public static Date getCurrData() {
        return Calendar.getInstance().getTime();
    }
}
